#include "system.h"
#include "enrollwindow.h"
#include "firstwindow.h"
#include "flightscheckwindow.h"
#include "interfacemanager.h"
#include "logwindow.h"
#include "paywindow.h"
#include "userordertestwindow.h"
System::System() {}
void System::start()
{
    // 创建子界面,并且注册进调度器
    LogWindow *logwindow = new LogWindow();
    EnrollWindow *enrollwindow = new EnrollWindow();
    //FlightsCheckWindow *flightscheck= new FlightsCheckWindow(); //先不注册查询页面，确定查询信息后再注册
    FirstWindow *firstwindow = new FirstWindow();
    UserordertestWindow *orderwindow = new UserordertestWindow();
    PayWindow *paywindow = new PayWindow();
    //注册界面
    InterfaceManager::instance()->registerPage("/MainWindow/First/Log", logwindow);
    InterfaceManager::instance()->registerPage("/MainWindow/First/Enroll", enrollwindow);
    //InterfaceManager::instance()->registerPage("/MainWindow/First/FlightCheck", flightscheck);
    InterfaceManager::instance()->registerPage("/MainWindow/First", firstwindow);
    InterfaceManager::instance()->registerPage("/MainWindow/First/Order", orderwindow);
    InterfaceManager::instance()->registerPage("/MainWindow/First/Pay", paywindow);
}
System::~System()
{
    //解除注册
    InterfaceManager ::instance()->unregisterPage("/MainWindow/First/Log");
    InterfaceManager ::instance()->unregisterPage("/MainWindow/First/Enroll");
    InterfaceManager ::instance()->unregisterPage("/MainWindow/First/FlightCheck");
    InterfaceManager ::instance()->unregisterPage("/MainWindow/First");
    InterfaceManager ::instance()->unregisterPage("/MainWindow/First/Order");
    InterfaceManager ::instance()->unregisterPage("/MainWindow/First/Pay");
}


